package integration.properties.protocol.impl;

import integration.dom.Message;
import integration.properties.protocol.Protocol;

public abstract class AbstractProtocol implements Protocol {

    @Override
    public Message fetchMessage(String sourceLocation) {
        System.out.println("Fetching message using protocol " + toString() + " from " + sourceLocation);
        Message message = new Message(); //todo: this is only for testing purposes
        message.setCompressed(true); //todo: this is only for testing purposes
        return message;
    }

    @Override
    public void sendMessage(Message message, String targetLocation) {
        System.out.println("Sending message "+message+" using " + toString() + " to " + targetLocation);
    }

}
